//
//  YinDaoYeViewController.m
//  PetTown
//
//  Created by lanou3g on 15/6/10.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "YinDaoYeViewController.h"

@interface YinDaoYeViewController ()

@end

@implementation YinDaoYeViewController
-(void)loadView
{
    self.yinDaoYe = [[YinDaoYeView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.view = _yinDaoYe;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    //设置点击事件
    [_yinDaoYe.enterButton addTarget:self action:@selector(enterButtonClick:) forControlEvents:UIControlEventTouchDown];

}

//设置点击事件
- (void)enterButtonClick:(UIButton *)button{
    AppDelegate * app = (AppDelegate * )[UIApplication sharedApplication].delegate;
    app.window.rootViewController = app.sideMenuVC;
    [app.window.rootViewController.view addSubview:app.changeView];
   NSUserDefaults * firstLogin = [NSUserDefaults standardUserDefaults];
    [firstLogin setObject:@"yidenglu" forKey:@"Login"];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    //清除缓存
    SDImageCache * sdI = [SDImageCache sharedImageCache];
    [sdI clearDisk];
    [sdI clearMemory];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
